package com.softtown.modules.workflow.dao;

import com.softtown.common.dao.BaseDao;
import com.softtown.modules.workflow.entity.SwfPhaseNameDefEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: Dingyayong
 * @Date: 2019/8/21 19:51
 * @Description:
 */
@Mapper
public interface SwfPhaseNameDefDao extends BaseDao<SwfPhaseNameDefEntity> {
    /**
    * 通过id找出审批段名字
    * @param  id
    * @return  SwfPhaseNameDefEntity
    * @author Dingyayong
    * @date 2019/8/22 10:08
    */
    SwfPhaseNameDefEntity getSwfPhaseNameById(Long id);
    /**
     * 通过公司id找出审批段名字List
     * @param  compId
     * @return  SwfPhaseNameDefEntity
     * @author Dingyayong
     * @date 2019/8/22 10:08
     */
    List<SwfPhaseNameDefEntity> getPhaseNameDefList(Long compId);

    /**
     * 通过公司id找出状态正常审批段名字List
     * @param  compId
     * @return  SwfPhaseNameDefEntity
     * @author Dingyayong
     * @date 2019/8/22 10:08
     */
    List<SwfPhaseNameDefEntity> getAprvNameByStatusList(Long compId);

    /**
     * 通过name找出审批段名字List
     * @param name
     * @param compId
     * @return
     */
    List<SwfPhaseNameDefEntity> getSwfPhaseNameByName(@Param("name") String  name,@Param("compId") Long compId);

    /**
     * 更新审批段
     * @param  swfPhaseNameDefEntity
     * @return  SwfPhaseNameDefEntity
     * @author Dingyayong
     * @date 2019/8/22 10:08
     */
    void  updateSwfPhaseName(SwfPhaseNameDefEntity swfPhaseNameDefEntity);
}
